 {
        
        var o = function () {
        };
        o.prototype = {
            ctor: function () {
                Global.notificationCenter.on(Global.eventName.GAME_NETWORK_CONNECT_SUCCESSED, this._onConnectSuccessed.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.NET_RECIVE_MSG, this._onHandler.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.GAME_SEND_HERAT_BEAT, this._onSendHeatBeat.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_LOGIN_SUCCESS, this._logInSuccess.bind(this), this),
                    this._heartBeatCount = 0, this.boolFirstLoginInit = !0;
            },
            destory: function () {
                Global.notificationCenter.offAll(this);
            },
            _logInSuccess: function (e) {
                var t = Global.userProfile;
                e.result && t.sdkLogInSuccess(e.result), Global.netWork.ctor();
            },
            _onConnectSuccessed: function (e) {
                var t = this._getTestUserId();
                cc.warn("********** 测试使用的 uiserId = " + t + " ***************");
                var n = {
                    cmd: Global.eventName.CMD_BIND_USER5,
                    apiVersion: Global.config.ApiVersion,
                    namespace: "hall",
                    params: {
                        userId: t,
                        gameId: 9999,
                        clientId: Global.config.CLIENTID,
                        intClientId: Global.config.intClientId,
                        authorCode: Global.userProfile.authorCode
                    }
                };
                Global.netWork.send(n), tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventType_BIND_USER, []);
            },
            _getTestUserId: function () {
                var e = Global.userProfile.getUserId();
                return e > 0 ? e : (e = 10002, cc.sys.platform == cc.sys.DESKTOP_BROWSER ? e = 10002 : cc.sys.platform == cc.sys.EDITOR_PAGE ? e = 10003 : cc.sys.platform == cc.sys.EDITOR_CORE ? e = 10004 : cc.sys.platform == cc.sys.WECHAT_GAME && (e = 10005),
                    Global.utils.randomInt(10002, 10050));
            },
            _onHandler: function (e) {
                try {
                    var t = Global.SDK.decode(e.data);
                    if (console.log("_onMessagemsg:" + t), null == t || "0000" == t) return;
                    var n = t.substr(0, t.length - 0);
                    if (null == n || n.length <= 0) return;
                    var o = JSON.parse(n);
                    void 0 == o && cc.error("MsgHandler _onHandler", "data == undefined");
                    var i = Global.eventName;
                    if (o.cmd == i.CMD_USER_INFO || o.cmd == i.CMD_USER_INFO5) {
                        Global.netWork.startSendHeartBeat();
                        var a = Global.userProfile;
                        o.result && (console.log("userprofile==", o.result), a.updateUserInfo(o.result),
                        this.boolFirstLoginInit && (Global.notificationCenter.emit(Global.eventName.MSG_ENTERGAME_AFTER_SETUSERINFO),
                            this.boolFirstLoginInit = !1, tywx.BiLog.clickStat(tywx.clickStatEventType.clickStatEventType_BIND_USER_SUCCESS, [])),
                            Global.notificationCenter.emit(Global.eventName.MSG_UPDATE_QUERY));
                    } else if (o.cmd == i.CMD_UPDATE_NOTIFY) {
                        a = Global.userProfile;
                        o.result && a.udpateNotify(o.result);
                    } else if (o.cmd == i.CMD_UPDATE_NOTIFY5) {
                        a = Global.userProfile;
                        o.result && a.udpateNotify(o.result);
                    } else if (o.cmd == i.CMD_GAME_DATA || o.cmd == i.CMD_GAME_DATA5) {
                        a = Global.userProfile;
                        o.result && a.udpateGameData(o.result);
                    } else if (o.cmd == i.CMD_MODULE_TIP) ; else if (o.cmd == i.CMD_HALL_GAME_LIST) {
                        a = Global.userProfile;
                        o.result && a.udpateGameList(o.result);
                    } else if (o.cmd == i.CMD_LOGOUT) {
                        cc.error("MsgHandler _onHandler", "CMD_LOGOUT   reason  :", o.reason), Global.netWork.stopSendHeartBeat();
                        var r = o.error;
                        Global.notificationCenter.emit(Global.eventName.GAME_SHOW_LOGOUT, r), r && 4 == r.code && Global.netWork.setIsLogout(!0);
                    } else if (o.cmd == i.CMD_ROOM_LIST) {
                        var s = Global.roomInfoModel;
                        o.result && (s.updateData(o.result), Global.notificationCenter.emit(Global.eventName.UPDATE_ROOMINFO_SUCCESSED, o.result));
                    } else if (o.cmd == i.CMD_PLAY_TILE) {
                        var l = Global.tableModel;
                        o.result && l.playTile(o.result);
                    } else if (o.cmd == i.CMD_TABLE_INFO) {
                        l = Global.tableModel;
                        o.result && l.init(o.result);
                    } else if (o.cmd == i.CMD_SIT) {
                        l = Global.tableModel;
                        o.result && l.playerSit(o.result);
                    } else if (o.cmd == i.CMD_TABLE_CALL) {
                        l = Global.tableModel;
                        o.result && l.tableCall(o.result);
                    } else if (o.cmd == i.CMD_TABLE_EVENT) {
                        l = Global.tableModel;
                        o.result && l.tableEvent(o.result);
                    } else if (o.cmd == i.CMD_QUICK_START) {
                        if (null != o.error && null != o.result.roomId && o.result.roomId > 0) {
                            var c = Global.roomInfoModel.getPlayModel(), d = o.result.roomId;
                            this.requestQuickStart(c, d, 0, 1);
                        }
                    } else if (o.cmd == i.CMD_TABLE_GAME_START) {
                        l = Global.tableModel;
                        o.result && l.tableGameStart(o.result);
                    } else if (o.cmd == i.CMD_INIT_TILES) {
                        l = Global.tableModel;
                        o.result && l.initTiles(o.result);
                    } else if (o.cmd == i.CMD_SEND_TILE) {
                        l = Global.tableModel;
                        o.result && l.sendTile(o.result);
                    } else if (o.cmd == i.CMD_SETTRUSTEE) {
                        l = Global.tableModel;
                        o.result && l.onSetTrustee(o.result);
                    } else if (o.cmd == i.CMD_REMOVE_TRUSTEE) {
                        l = Global.tableModel;
                        o.result && l.onRemoveTrustee(o.result);
                    } else if (o.cmd == i.CMD_PENG) {
                        l = Global.tableModel;
                        o.result && l.peng(o.result);
                    } else if (o.cmd == i.CMD_GANG) {
                        l = Global.tableModel;
                        o.result && l.gang(o.result);
                    } else if (o.cmd == i.CMD_HU) {
                        l = Global.tableModel;
                        o.result && l.win(o.result);
                    } else if (o.cmd == i.CMD_grabGangHu) {
                        l = Global.tableModel;
                        o.result && l.grabGangHu(o.result);
                    } else if (o.cmd == i.CMD_CHI) {
                        l = Global.tableModel;
                        o.result && l.chi(o.result);
                    } else if (o.cmd == i.CMD_TING) {
                        l = Global.tableModel;
                        o.result && (l.ting(o.result), Global.notificationCenter.emit(Global.eventName.MSG_TING, o.result));
                    } else if (o.cmd == i.CMD_LOSE) {
                        l = Global.tableModel;
                        o.result && l.lose(o.result);
                    } else if (o.cmd == i.CMD_ASK_ABSENCE) {
                        l = Global.tableModel;
                        o.result && l.askAbsence(o.result);
                    } else if (o.cmd == i.CMD_NOTIFY_ABSENCE) {
                        l = Global.tableModel;
                        o.result && l.notifyAbsence(o.result);
                    } else if (o.cmd == i.CMD_ABSENCE_END) {
                        l = Global.tableModel;
                        o.result && l.absenceEnd(o.result);
                    } else if (o.cmd == i.CMD_SCORE) {
                        l = Global.tableModel;
                        o.result && l.updateScore(o.result);
                    } else if (o.cmd == i.CMD_ROUND_RESULT) {
                        l = Global.tableModel;
                        o.result && l.roundResult(o.result);
                    } else if (o.cmd == i.CMD_DETAIL_INFO) {
                        l = Global.tableModel;
                        o.result && l.detailInfo(o.result);
                    } else if (o.cmd == i.CMD_TODO_TASKS) o.result && Global.notificationCenter.emit(Global.eventName.GAME_TASKS, o.result); else if (o.cmd == i.CMD_SEVENDAYS_CHECKIN) {
                        if (o.error) return void Global.notificationCenter.emit(Global.eventName.GAME_SHOW_COMMTIPS, o.error.info);
                        o.result && Global.notificationCenter.emit(Global.eventName.CMD_SEVENDAYS_CHECKIN, o.result);
                    } else o.cmd == i.CMD_GET_REWARD ? o.result && (console.log("msgHandler 福利信息 objectData.result ==", o.result),
                        Global.notificationCenter.emit(Global.eventName.MSG_REWARD_INFO, o.result)) : o.cmd == i.CMD_STORE ? o && (console.log("msgHandler 充值列表 objectData ==", o),
                        Global.notificationCenter.emit(Global.eventName.MSG_STORE, o)) : o.cmd == i.GAME_TABLE_CHAT ? o.result && (console.log("msgHandler table_chat"),
                        Global.notificationCenter.emit(Global.eventName.GAME_TABLE_CHAT, o.result)) : o.cmd == i.CMD_INVITE_FRIEND ? o.result && (console.log("msgHandler invite_friend"),
                        Global.notificationCenter.emit(Global.eventName.MSG_POPUPDATA_INVITE_FRIEND, o.result)) : o.cmd == i.CMD_INVITE_FRIEND_HELP ? o && (console.log("msgHandler invite_friend_help"),
                        Global.notificationCenter.emit(Global.eventName.MSG_POPUPDATA_INVITE_FRIEND_HELP, o)) : o.cmd == i.CMD_INVITE_FRIEND_ALL_PRIZE ? o && (console.log("msgHandler invite_friend_all_prize"),
                        Global.notificationCenter.emit(Global.eventName.MSG_INVITE_FRIEND_ALL_PRIZE, o)) : o.cmd == i.CMD_INVITE_FRIEND_BIG_PRIZE ? o && (console.log("msgHandler invite_friend_big_prize"),
                        Global.notificationCenter.emit(Global.eventName.MSG_INVITE_FRIEND_BIG_PRIZE, o)) : o.cmd == i.CMD_CREATE_TABLE_DISSOLUTION ? o && (console.log("msgHandler create_table_dissolution"),
                        Global.notificationCenter.emit(Global.eventName.MSG_CREATE_TABLE_DISSOLUTION, o.result)) : o.cmd == i.CMD_UPDATE_CREATE_TABLE_VOTE_INFO ? o && (console.log("msgHandler UPDATE_CREATE_TABLE_VOTE_INFO"),
                        Global.tableModel.setUserLeaveVote(o.result), Global.notificationCenter.emit(Global.eventName.MSG_UPDATE_CREATE_TABLE_VOTE_INFO, o)) : o.cmd == i.CMD_GAME_LEAVE_DISPLAY_BUDGET ? o && (console.log("msgHandler gaming_leave_display_budget"),
                        Global.tableModel.totalResult(o.result)) : o.cmd == i.CMD_USER_LEAVE_VOTE ? o && (console.log("msgHandler user_leave_vote"),
                        Global.notificationCenter.emit(Global.eventName.MSG_USER_LEAVE_VOTE, o.result)) : o.cmd == i.CMD_LEAVE ? o && (console.log("msgHandler leave"),
                        Global.notificationCenter.emit(Global.eventName.MSG_LEAVE, o.result)) : o.cmd == i.GAME_COIN_BUY_INFO ? o && (console.log("msgHandler coin_buy_info"),
                        Global.notificationCenter.emit(Global.eventName.MSG_COIN_BUY_INFO, o.result)) : o.cmd == i.GAME_USER_ONLINE_INFO ? o && (console.log("msgHandler user_online_info"),
                        Global.notificationCenter.emit(Global.eventName.MSG_USER_ONLINE_INFO, o.result)) : o.cmd == i.CMD_GET_SHARE_DIAMOND_INFO ? o && (console.log("msgHandler weixin_h5_share_diamond"),
                        Global.notificationCenter.emit(Global.eventName.MSG_GET_SHARE_DIAMOND_INFO, o.result)) : o.cmd == i.CMD_GET_SHARE_DIAMOND ? o && (console.log("msgHandler weixin_h5_get_share_diamond"),
                        Global.notificationCenter.emit(Global.eventName.MSG_GET_SHARE_DIAMOND, o)) : o.cmd == i.CMD_SHARE_FRIEND_ENTER ? o && (console.log("msgHandler weixin_h5_friend_enter"),
                        Global.notificationCenter.emit(Global.eventName.MSG_SHARE_FRIEND_ENTER, o.result)) : o.cmd == i.CMD_RED_SUCC_COUNT ? o && (console.log("msgHandler weixin_h5_red_succ_count"),
                        Global.notificationCenter.emit(Global.eventName.MSG_RED_SUCC_COUNT, o.result)) : o.cmd == i.CMD_RESTART_QUICK ? o && (console.log("msgHandler weixin_h5_restart_quick"),
                        Global.notificationCenter.emit(Global.eventName.MSG_RESTART_QUICK, o.result)) : o.cmd == i.CMD_DIAMOND_RELIVE ? o && (console.log("msgHandler weixin_h5_diamond_relive"),
                        Global.notificationCenter.emit(Global.eventName.MSG_DIAMOND_RELIVE, o)) : o.cmd == i.CMD_COIN_BUY ? o && (console.log("msgHandler coin_gift_buy"),
                        Global.notificationCenter.emit(Global.eventName.MSG_COIN_BUY, o)) : o.cmd == i.CMD_GAME ? o && (console.log("msgHandler getYuanBao", o.result.action, Global.eventName.MSG_CASH_RECORD),
                        Global.notificationCenter.emit(Global.eventName.MSG_GET_YUANBAO_NUM, o), o.result.action == Global.eventName.MSG_CASH ? Global.notificationCenter.emit(Global.eventName.MSG_CASH, o) : o.result.action == Global.eventName.MSG_CASH_RECORD && (cc.log("msgHandler getYuanBao+++++++++++++++++++11"),
                        Global.notificationCenter.emit(Global.eventName.MSG_CASH_RECORD, o))) : o.cmd == i.CMD_HAPPYBAG5 ? o && (console.log("msgHandler happybag5"),
                        Global.notificationCenter.emit(Global.eventName.MSG_HAPPYBAG5, o.result)) : o.cmd == i.CMD_SHARE5 ? o && (console.log("msgHandler share5"),
                        Global.notificationCenter.emit(Global.eventName.MSH_SHARE5, o.result)) : o.cmd == i.CMD_LUCKY_TILES ? o && (console.log("msgHandler CMD_LUCKY_TILES"),
                        Global.tableModel.setIsShowLuckyTile(!0), Global.notificationCenter.emit(Global.eventName.MSG_SHOW_LUCKY_TILES, o.result)) : o.cmd == i.CMD_SHOW_TIPS ? o && (console.log("msgHandler showtips"),
                        Global.notificationCenter.emit(Global.eventName.MSG_SHOW_TIPS, o.result)) : o.cmd == i.CMD_REQUEST_SHARE_PAY ? o && (console.log("********系统包赔或者双倍奖励回掉2/转运************", o.result.action),
                        "game_share_bonus" == o.result.action ? Global.notificationCenter.emit(Global.eventName.MSG_PAY_SHARE_RESULT, o.result) : o.result.action == Global.eventName.CMD_REQUEST_REDPACKET ? (console.log("********发红包CMD_REQUEST_REDPACKET", o),
                            Global.notificationCenter.emit(Global.eventName.MSG_REQUEST_RED_PACKET, o)) : o.result.action == Global.eventName.CMD_REQUEST_REDPACKET_OPEN ? (console.log("********拆红包CMD_REQUEST_REDPACKET_OPEN************", o),
                            Global.notificationCenter.emit(Global.eventName.MSG_REQUEST_RED_PACKET_OPEN, o)) : o.result.action == Global.eventName.CMD_REQUEST_REDPACKET_CHECK && (console.log("********检查红包CMD_REQUEST_REDPACKET_CHECK************", o),
                            Global.notificationCenter.emit(Global.eventName.MSG_REQUEST_RED_PACKET_CHECK, o))) : o.cmd == i.CMD_GOTO_TABLE5 ? o && (console.log("msgHandler CMD_GOTO_TABLE5"),
                        Global.userProfile.updateLoc(o.result)) : o.cmd == i.CMD_CASH && console.error("msgHandler CMD_CASH +++++++++++++");
                } catch (r) {
                    cc.error("MsgHandler _onHandler", "catch error : " + r.stack);
                }
            },
            _onSendHeatBeat: function () {
                this.requestSendHeartBeat();
            },
            requestRedSuccessCount: function (e, t, n) {
                var o = {
                    cmd: Global.eventName.CMD_GAME,
                    params: {
                        action: e,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        reliveIndex: t,
                        needDiamond: n
                    }
                };
                Global.netWork.send(o);
            },
            requestGetYuanBaoNum: function () {
                var e = {
                    cmd: Global.eventName.CMD_GAME,
                    params: {
                        action: Global.eventName.CMD_GET_YUANBAO_NUM,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(e);
            },
            requestTaskShareSuccess: function (e) {
                e = e || "weixin";
                cc.error("Global.userProfile.getUserId()+++++,requestTaskShareSuccess", Global.userProfile.getUserId());
                var t = {
                    cmd: Global.eventName.CMD_SHARE5,
                    apiVersion: Global.config.ApiVersion,
                    namespace: "hall",
                    params: {
                        userId: Global.userProfile.getUserId(),
                        action: e,
                        gameId: 9999,
                        clientId: Global.config.CLIENTID,
                        intClientId: Global.config.intClientId
                    }
                };
                Global.netWork.send(t);
            },
            requestTaskData: function () {
                var e = {
                    cmd: Global.eventName.CMD_HAPPYBAG5,
                    apiVersion: Global.config.ApiVersion,
                    namespace: "hall",
                    params: {
                        action: "ui",
                        userId: Global.userProfile.getUserId(),
                        gameId: 9999,
                        intClientId: Global.config.intClientId,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(e);
            },
            requestGetTaskReward: function (e) {
                console.error("获取任务奖励++++++++++=====获取任务奖励", e);
                var t = {
                    cmd: Global.eventName.CMD_HAPPYBAG5,
                    apiVersion: Global.config.ApiVersion,
                    namespace: "hall",
                    params: {
                        action: "getreward",
                        userId: Global.userProfile.getUserId(),
                        gameId: 9999,
                        intClientId: Global.config.intClientId,
                        clientId: Global.config.CLIENTID,
                        taskId: e.taskId,
                        itemId: e.kindId,
                        double: e.type || 0
                    }
                };
                Global.netWork.send(t);
            },
            requestGetVideoReward: function (e) {
                console.error("获取任务奖励++++++++++=====获取任务奖励", e);
                var t = {
                    cmd: Global.eventName.CMD_HAPPYBAG5,
                    apiVersion: Global.config.ApiVersion,
                    namespace: "hall",
                    params: {
                        action: "readaddsreward",
                        userId: Global.userProfile.getUserId(),
                        gameId: 9999,
                        intClientId: Global.config.intClientId,
                        clientId: Global.config.CLIENTID,
                        taskId: e.taskId,
                        itemId: e.kindId,
                        double: e.type || 0
                    }
                };
                Global.netWork.send(t);
            },
            requestBuyCoin: function (e, t, n, o) {
                var i = {
                    cmd: Global.eventName.CMD_GAME,
                    params: {
                        action: e,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        roomId: t,
                        tableId: n,
                        buyType: o
                    }
                };
                Global.netWork.send(i);
            },
            requestShopList: function () {
                var e = {
                    cmd: Global.eventName.CMD_STORE,
                    apiVersion: Global.config.ApiVersion,
                    namespace: "hall",
                    params: {
                        action: Global.eventName.GET_UI,
                        gameId: 9999,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        intClientId: Global.config.intClientId
                    }
                };
                Global.netWork.send(e);
            },
            requestSendHeartBeat: function () {
                var e = this._getTestUserId();
                this._heartBeatCount++;
                var t = {
                    apiVersion: Global.config.ApiVersion,
                    namespace: "gd_sichuanmajiang",
                    cmd: "heart_beat",
                    params: {
                        userId: e,
                        gameId: 9999,
                        intClientId: Global.config.intClientId,
                        deviceId: "doudizhu",
                        heartBeatCount: this._heartBeatCount
                    }
                };
                cc.warn(" ***************** _sendHeartBeat ***************** "), Global.netWork.send(t);
            },
            requestGetUserInfo: function () {
                var e = this._getTestUserId(), t = {
                    apiVersion: Global.config.ApiVersion,
                    namespace: "hall",
                    cmd: "user_info",
                    params: {
                        userId: e,
                        gameId: 9999,
                        intClientId: Global.config.intClientId
                    }
                };
                Global.netWork.send(t);
            },
            requestPaymentInfo: function (e) {
                var t = this._getTestUserId(), n = {
                    cmd: Global.eventName.CMD_STORE,
                    params: {
                        userId: t,
                        gameId: 9999,
                        intClientId: Global.config.intClientId,
                        action: "yuanbaobuy",
                        prodCount: 1,
                        prodId: e,
                        realGameId: Global.config.GAMEID
                    }
                };
                Global.netWork.send(n);
            },
            requestDissolutionCustomRoom: function (e, t, n) {
                var o = {
                    cmd: "table_call",
                    params: {
                        action: "create_table_dissolution",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        userId: this._getTestUserId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(o);
            },
            requestCustomRoomQuitVote: function (e, t, n, o) {
                var i = {
                    cmd: "table_call",
                    params: {
                        action: "create_table_dissolution",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        vote: o,
                        userId: this._getTestUserId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(i);
            },
            requestUserLeaveVote: function (e, t, n, o) {
                var i = {
                    cmd: "table_call",
                    params: {
                        action: "user_leave_vote",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        vote: o,
                        userId: this._getTestUserId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(i);
            },
            requestReady: function (e, t, n) {
                var o = {
                    cmd: "table_call",
                    params: {
                        action: "ready",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        userId: this._getTestUserId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(o);
            },
            requestNextRound: function (e, t, n) {
                var o = {
                    cmd: "table_call",
                    params: {
                        action: "next_round",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        userId: this._getTestUserId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(o);
            },
            requestRewardData: function (e, t) {
                var n = {
                    cmd: "daily_free_give",
                    params: {
                        userId: this._getTestUserId(),
                        action: e,
                        gameId: 9999,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(n);
            },
            requestGetRelief: function () {
                var e = {
                    cmd: "daily_free_give",
                    params: {
                        userId: this._getTestUserId(),
                        action: "recieve",
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(e);
            },
            requestGetGameData: function () {
            },
            requestQuickStart: function (e, t, n, o) {
                cc.log("requestQuickStart...");
                var i = {
                    cmd: "quick_start",
                    params: {
                        play_mode: e,
                        roomId: t,
                        tableId: n,
                        version: 2,
                        protocolVer: 1,
                        isRestart: o,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        _version: Global.config.VERSION
                    }
                };
                Global.netWork.send(i);
            },
            requestHuanPai: function (e, t, n, o) {
                var i = {
                    cmd: "table_call",
                    params: {
                        action: "ask_huanPai",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        tiles: o,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        _version: Global.config.VERSION
                    }
                };
                Global.netWork.send(i);
            },
            requestAbsence: function (e, t, n, o) {
                var i = {
                    cmd: "table_call",
                    params: {
                        action: "ding_absence",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        color: o,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        _version: Global.config.VERSION
                    }
                };
                Global.netWork.send(i);
            },
            requestPlayTile: function (e, t, n, o, i) {
                var a = {
                    cmd: "table_call",
                    params: {
                        action: "play",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        tile: o,
                        ting: i = void 0 == i ? 0 : i,
                        style: -1,
                        action_id: Global.tableModel.getActionId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(a);
            },
            requestPeng: function (e, t, n, o) {
                var i = {
                    cmd: "table_call",
                    params: {
                        action: "peng",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        tile: o[0],
                        pattern: o,
                        style: -1,
                        action_id: Global.tableModel.getActionId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(i);
            },
            requestGang: function (e, t, n, o) {
                var i = {
                    cmd: "table_call",
                    params: {
                        action: "gang",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        tile: o.tile,
                        gang: o,
                        style: -1,
                        action_id: Global.tableModel.getActionId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(i);
            },
            requestHu: function (e, t, n, o, i) {
                var a = {
                    cmd: "table_call",
                    params: {
                        action: i = void 0 == i ? "win" : i,
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        tile: o,
                        action_id: Global.tableModel.getActionId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(a);
            },
            requestChi: function (e, t, n, o, i) {
                var a = {
                    cmd: "table_call",
                    params: {
                        action: "chi",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        pattern: o,
                        tile: i,
                        style: -1,
                        action_id: Global.tableModel.getActionId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(a);
            },
            requestGuo: function (e, t, n) {
                var o = {
                    cmd: "table_call",
                    params: {
                        action: "pass",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        style: -1,
                        action_id: Global.tableModel.getActionId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(o);
            },
            requestCancelTrustee: function (e, t, n) {
                var o = {
                    cmd: "table_call",
                    params: {
                        action: "remove_trustee",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(o);
            },
            requestTableLeave: function (e, t, n) {
                var o = "leave";
                "create" == Global.tableModel.getTableType() && (o = "create_table_user_leave");
                var i = {
                    clientId: Global.config.CLIENTID,
                    cmd: "table_call",
                    params: {
                        action: o,
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(i);
            },
            requestCreateRoomInfo: function (e) {
                var t = {
                    cmd: "game",
                    params: {
                        action: "create_table_info",
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        playModes: e
                    }
                };
                Global.netWork.send(t), cc.log("requestCreateRoomInfo", 5, "正在请求房间配置...");
            },
            requestCreateRoom: function (e, t) {
                var n = {
                    cmd: "game",
                    params: {
                        action: "create_table",
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        roomId: 0,
                        tableId: 0,
                        play_mode: t,
                        itemParams: e
                    }
                };
                Global.netWork.send(n), cc.log("requestCreateRoomInfo", 5, "正在创建房间...");
            },
            requestJoinRoom: function (e) {
                var t = {
                    cmd: "game",
                    params: {
                        action: "join_create_table",
                        gameId: Global.config.GAMEID_NORMAL,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId(),
                        roomId: 0,
                        tableId: 0,
                        play_mode: "friendtable",
                        createTableNo: e
                    }
                };
                Global.netWork.send(t), cc.log("requestJoinRoom", 5, "正在进入房间...");
            },
            requestSevenDays_checkin: function (e, t) {
                var n = {
                    cmd: "sevendays_checkin",
                    params: {
                        userId: Global.userProfile.getUserId(),
                        action: e,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        double: t
                    }
                };
                Global.netWork.send(n);
            },
            requestRoomList: function (e, t) {
                var n = {
                    cmd: "room_list",
                    params: {
                        play_mode: e,
                        gameId: t,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(n);
            },
            requestInteractionEmotion: function (e, t, n) {
                var o = Global.tableModel, i = {
                    cmd: Global.eventName.GAME_TABLE_CHAT,
                    params: {
                        userId: Global.userProfile.getUserId(),
                        roomId: o.getRoomId(),
                        tableId: o.getTableId(),
                        seatId: o.getSeatId(),
                        gameId: o.getGameId(),
                        msg: e,
                        isFace: n,
                        voiceIdx: t,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(i);
            },
            requestShareInfo: function (e, t, n) {
                wx.request({
                    url: tywx.SystemInfo.loginUrl + "szmajiang/weixin/encrypted?",
                    data: {
                        wx_3rd_session: e,
                        encryptedData: t,
                        iv: n
                    },
                    success: function (e) {
                        console.log("requestShareInfo success, params:" + JSON.stringify(e)), Global.notificationCenter.emit(Global.eventName.MSG_GET_SHAREINFO, e.datas);
                    },
                    fail: function (e) {
                        console.log("requestShareInfo fail, params:" + JSON.stringify(e));
                    },
                    complete: function (e) {
                    }
                });
            },
            requestShareSuccess: function (e, t, n) {
                var o = {
                    cmd: Global.eventName.CMD_GAME,
                    params: {
                        action: "weixin_h5_get_share_diamond",
                        userId: Global.userProfile.getUserId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        rewardType: t,
                        wxQunId: e,
                        rewardIndex: n
                    }
                };
                Global.netWork.send(o);
            },
            requestShareWorldCup: function (e, t, n) {
                var o = {
                    cmd: Global.eventName.CMD_GAME,
                    params: {
                        action: "weixin_h5_world_cup_reward",
                        userId: Global.userProfile.getUserId(),
                        gameId: Global.config.GAMEID_NORMAL,
                        clientId: Global.config.CLIENTID,
                        rewardType: t,
                        wxQunId: e,
                        rewardIndex: n
                    }
                };
                Global.netWork.send(o);
            },
            requestGetShareMsg: function () {
                var e = {
                    cmd: Global.eventName.CMD_GAME,
                    params: {
                        action: "weixin_h5_share_diamond",
                        userId: Global.userProfile.getUserId(),
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(e);
            },
            requestGetWorldCupMsg: function () {
            },
            requestInviteFri: function (e, t) {
                var n = {
                    cmd: "game",
                    params: {
                        action: e,
                        gameId: Global.config.GAMEID_NORMAL,
                        clientId: Global.config.CLIENTID,
                        userId: t
                    }
                };
                Global.netWork.send(n), cc.log("requestInviteFri+++++++++++++++++++++++++++++++");
            },
            requestBeInviteFri: function (e, t, n) {
                var o = {
                    cmd: "game",
                    params: {
                        action: e,
                        gameId: Global.config.GAMEID_NORMAL,
                        clientId: Global.config.CLIENTID,
                        userId: t,
                        helperUserId: n
                    }
                };
                Global.netWork.send(o), cc.log("requestBeInviteFri+++++++++++++++++++++++++++++++");
            },
            requestHide: function (e, t, n) {
                var o = {
                    cmd: "table_manage",
                    params: {
                        action: "enter_background",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(o);
            },
            requestUserWithdrawInfo: function () {
                Global.notificationCenter.emit(Global.eventName.CMD_RECIVE_MESSAGE_LIST);
            },
            requestCharge: function (e, t, n, o, i) {
                var a = Global.userProfile;
                if (a) {
                    var r = a.getUserProfile().chip;
                    if (cc.log("requestCharge=", r), r > 0 && -1 == o) return void cc.error("是不是你发送的不充值！！！！！seatId =", n, o, r);
                }
                var s = {
                    cmd: "table_call",
                    params: {
                        action: "charge",
                        roomId: e,
                        tableId: t,
                        seatId: n,
                        action_id: i,
                        resutl: o,
                        gameId: Global.config.GAMEID,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(s);
            },
            requestResultPay: function (e) {
                cc.warn(" ********requestResultPay**************");
                var t = {
                    cmd: Global.eventName.CMD_REQUEST_SHARE_PAY,
                    params: {
                        action: "game_share_bonus",
                        win: e,
                        gameId: 200,
                        clientId: Global.config.CLIENTID,
                        userId: Global.userProfile.getUserId()
                    }
                };
                Global.netWork.send(t);
            },
            requestSkipLuckRedPacket: function (e, t, n) {
                cc.log(" ********requestSkipLuckRedPacket**************", t);
                var o = {
                    cmd: Global.eventName.CMD_REQUEST_SHARE_PAY,
                    params: {
                        action: e,
                        gameId: 200,
                        userId: Global.userProfile.getUserId(),
                        clientId: Global.config.CLIENTID,
                        redPacketId: t,
                        userNick: Global.userProfile.getUserName()
                    }
                };
                Global.netWork.send(o), console.log(" ********requestSkipLuckRedPacket**************", o);
            },
            requestCheckRedPacket: function (e) {
                cc.log(" ********requestCheckRedPacket**************");
                var t = {
                    cmd: Global.eventName.CMD_REQUEST_SHARE_PAY,
                    params: {
                        action: e,
                        gameId: 200,
                        userId: Global.userProfile.getUserId(),
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(t);
            },
            getCashReward: function (e) {
                if (!(e && e < 0)) {
                    var t = {
                        cmd: Global.eventName.CMD_GAME,
                        params: {
                            userId: Global.userProfile.getUserId(),
                            action: "get_cash",
                            gameId: 9999,
                            value: e,
                            wxappId: tywx.SystemInfo.wxAppId,
                            clientId: Global.config.CLIENTID
                        }
                    };
                    Global.netWork.send(t);
                }
            },
            getCashRecord: function () {
                var e = {
                    cmd: Global.eventName.CMD_GAME,
                    params: {
                        userId: Global.userProfile.getUserId(),
                        action: "get_cashrecord",
                        gameId: 9999,
                        wxappId: tywx.SystemInfo.wxAppId,
                        clientId: Global.config.CLIENTID
                    }
                };
                Global.netWork.send(e);
            }
        },  module.exports = o
    }